<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
	<head>
		<meta charset="utf-8">
		<title>用户注册</title>
		<link rel="stylesheet" type="text/css" href="./layui/css/layui.css">
		<style type="text/css">
			body {
				background-color: #F7F7F7;
			}

			.layui-input-inline dl dd.layui-this {
				background-color: #4595ff
			}

			.layui-input-inline dl dd:hover {
				background-color: #4595ff
			}

			.layui-form-radio>i:hover,
			.layui-form-radioed>i {
				color: #4595ff;
			}
		</style>

		<script>
			function initradio(rName, rValue) {
				var rObj = document.getElementsByName(rName);

				for (var i = 0; i < rObj.length; i++) {
					if (rObj[i].value == rValue) {
						rObj[i].checked = 'checked';
					}
				}
			}
		</script>

	</head>
	<body>
		<script>
			var sex = '';
		</script>
		<script>
			function setsex1() {
				sex = '男';
			}
		</script>
		<script>
			function setsex2() {
				sex = '女';
			}
		</script>

		<form class="layui-form" action="/web/register" method="post" id="form1" name="form1">
			<div class="layui-container" style="width:100%;background-color: #FFF;">
				<div class="layui-row">
					<div class="layui-col-md8" style="margin-left:20%"><img src="/layui/image/xiaohui4.jpg" width=auto
							height=auto></div>
				</div>
			</div>
			<div class="layui-col-md6"
				style="margin-top:2%;margin-left:25%;background-color: #FFF; border:1px solid #ccc">
				<div class="layui-row" style="padding-top:1%; ">
					<div class="layui-col-md11"
						style=" margin-left:4.25%;height:auto;font-size:2em; font-weight:bold; color:#4595ff;text-align:center;">
						用户注册
						<hr>
					</div>
				</div>
				<div class="layui-form-item" style="margin-top:1%">
					<label class="layui-form-label">用户名称</label>
					<div class="layui-input-inline">
						<input style="width: 25.75em" type="text" name="username" id="username" th:value="${username}"
							required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">

					</div>
					<div class="layui-form-mid layui-word-aux" style=" margin-left:18%"><span th:text="${usermsg}"
							style="color: red" /></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">用户密码</label>
					<div class="layui-input-inline">
						<input style="width: 25.75em" type="password" name="password" id="textfiold"
							th:value="${password}" required lay-verify="required" placeholder="请输入密码" autocomplete="off"
							class="layui-input">
					</div>


				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">确认密码</label>
					<div class="layui-input-inline">
						<input style="width: 25.75em" type="password" name="password2" id="textfiold2"
							th:value="${password2}" required lay-verify="required" placeholder="请确认密码"
							autocomplete="off" class="layui-input">

					</div>
					<div class="layui-form-mid layui-word-aux" style=" margin-left:18%"><span th:text="${passwordmsg}"
							style="color: red" /></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">身份类型</label>
					<div class="layui-input-inline">
						<select name="type" lay-verify="">
							<option value="" th:text="${type}" style="color: black"></option>
							<option value="学生">学生</option>
							<option value="老师">老师</option>
						</select>
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">联系电话</label>
					<div class="layui-input-inline">
						<input style="width: 25.75em" type="number" name="introduction" id="introduction"
							th:value="${introduction}" required lay-verify="required" placeholder="请输入号码"
							autocomplete="off" class="layui-input">

					</div>
					<div class="layui-form-mid layui-word-aux" style=" margin-left:18%"><span th:text="${introduction}"
							style="color: red" /></div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">电子邮箱</label>
					<div class="layui-input-inline">
						<input style="width: 25.75em" type="email" name="email" id="email" th:value="${email}" required
							lay-verify="required" placeholder="请输入邮箱" autocomplete="off" class="layui-input">
					</div>
				</div>

				<div class="layui-form-item">
					<label class="layui-form-label">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别</label>
					<div class="layui-input-inline">
						<select name="sex" lay-verify="">
							<option value="" th:text="${sex}" style="color: black"></option>
							<option value="男">男</option>
							<option value="女">女</option>
						</select>
					</div>
				</div>
				<!-- <div class="layui-form-item layui-form-text">
          <label class="layui-form-label">文本域</label>
          <div class="layui-input-inline">
            <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
          </div>
        </div>-->
				<div class="layui-form-item" style="margin-left:29%;margin-top:3%">
					<div class="layui-input-block">
						<button type="submit" name="button" id="button" class="layui-btn layui-btn-normal">立即注册</button>
						<button type="reset" class="layui-btn layui-btn-normal">重置</button>
					</div>
				</div>
			</div>
		</form>
		<script>
			initradio('sex', sex);
		</script>

		<script>
			//Demo
			layui.use('form', function() {
				var form = layui.form;

				//监听提交
				form.on('submit(formDemo)', function(data) {
					layer.msg(JSON.stringify(data.field));
					return false;
				});
			});
		</script>
		<script type="text/javascript" src="./layui/layui.all.js"></script>
		<script type="text/javascript"></script>

	</body>
</html>
